package kr.hyunist.androidcomplete01saeildamil.ch12;

import java.util.*;

import kr.hyunist.androidcomplete01saeildamil.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.view.View.OnClickListener;
import android.widget.*;

public class ListViewEx extends Activity {
	ArrayAdapter<String> Adapter;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.listviewtest);
		
		ArrayList<String> arGeneral = new ArrayList<String>();
		
		arGeneral.add("김유신");
		arGeneral.add("이순신");
		arGeneral.add("강감찬");
		arGeneral.add("을지문덕");
		
		//어댑터 준비
		Adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, arGeneral);
		
		//어댑터 연결
		ListView list = (ListView) findViewById(R.id.listViewTestlist);
		list.setAdapter(Adapter);
		
	}

}
